{layout name="layout/layout" /}
<div class="layuimini-container">
    <div class="layuimini-main">
        <blockquote class="layui-elem-quote">
            溯源员工
        </blockquote>
        <table class="layui-table">
            <thead>
            <tr>
                <th><div align="center">头像</div></th>
                <th><div align="center">昵称</div></th>
            </tr>
            </thead>
            <tr>
                <th><div align="center"><img src="{$staff.avatar_url}" width="40" /></div></th>
                <th><div align="center">{$staff.nickname}</div></th>
            </tr>
        </table>

        <blockquote class="layui-elem-quote">
            直推人员
        </blockquote>
        <table id="direct_recom" class="layui-table layui-hide"></table>
    </div>
</div>
<script type="text/javascript">
    layui.use(['table'], function() {
        var table = layui.table, $ = layui.jquery;
        table.render({
            elem: '#direct_recom'
            ,url: 'direct_recom?id={$id}'
            ,page: true
            ,limit: 20
            ,skin: 'row'
            ,even: true
            ,text: {none : '暂无相关数据'}
            ,defaultToolbar: ['filter']
            ,cols: [[
                {field: 'nickname', title: '会员昵称'},
            ]]
        });
    });
</script>
